﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TCG.Engine.Core;

namespace TCG.Engine.Effects
{
    public class OvertimeEffect: EffectBase
    {
        protected int duration;

        public OvertimeEffect(int duration)
        {
            this.duration = duration;
        }

        public override void StartTurn(Match m)
        {
            duration--;
        }

        public override void EndTurn(Match m)
        {
            if (duration == 0)
            {
                m.Player1.Effects.Remove(this);
                m.Player2.Effects.Remove(this);
            }
        }
    }
}
